# from soupsieve import match


# import math
# def circlearea(r):
#     result = math.pi*r*r
#     return result
# r = 10
# print('半径为', r, '的圆面积', circlearea(r))

# import math 
# r = 10
# result = lambda r:math.pi*r*r
# print('半径为', r, '的圆面积', result(r))

# bookinfo = [('不一样的卡梅拉(全套)', 22.50, 120), ('零基础学Android')]

def division():
    '''功能:'''
    print("\n===========================")
    apple = int(input("请输入苹果的个数"))
    children = int(input("请输入来了几个小朋友"))
    result = apple//children
    remain = apple-result*children
    if remain>0:
        print(apple, "个苹果,平均分给", children, "个小朋友,每人分", result, "个,剩下", remain, "个")
    else:
        print(apple, "个苹果,平均分给", children, "个小朋友,每人分", result, "个。")
        
try:
    division()
except ZeroDivisionError:
    print("出错了苹果不能被0个小朋友分")
except ValueError as e:
    print("输入错误", e)
else:
    print("顺利完成")
finally:
    print("进行了一次分苹果操作")
